#include<bits/stdc++.h>
using namespace std;
#define int long long
#define N 100010
int a[N],v[N];
signed main(){
	freopen("duel.in","r",stdin);
	freopen("duel.out","w",stdout);
	ios::sync_with_stdio(false),cin.tie(0),cout.tie(0);
	memset(v,0x3f,sizeof(v));
	int n,ans,t;
	cin>>n;
	ans=t=n;
	for(int i=1;i<=n;i++){
		cin>>a[i];
	}
	sort(a+1,a+n+1);
	for(int i=n;i>=1;i--){
		while(a[i]<=a[t] && t) t--;
		if(!t) break;
		if(a[i]>a[t]){
			ans--;
			t--;
		}
	}
	cout<<ans<<"\n";
	return 0;
}